package com.hb.umsp.contraller;

import com.hb.umsp.entity.HbUser;
import com.hb.umsp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("/insertUser")
    public void inserUser(@RequestBody HbUser user){
        userService.insertUser(user);
    }

    @RequestMapping("/updateUser")
    public void updateUser(@RequestBody HbUser user){
        userService.updateUser(user);
    }

}
